﻿<navigation:Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:datagrid="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" 
    xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    mc:Ignorable="d" 
    xmlns:input="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input" 
    x:Class="RM.WebClient.TestSearch"
    Height="540" Loaded="UserControl_Loaded">
	<Grid x:Name="gridTestList" Width="1000" VerticalAlignment="Top" ShowGridLines="False">
		<Grid.RowDefinitions>
			<RowDefinition Height="0.087*"/>
			<RowDefinition Height="0.913*"/>
		</Grid.RowDefinitions>
		<StackPanel Orientation="Horizontal" Margin="10,0,0,0">
			<dataInput:Label x:Name="lblNameSearch" Height="31" HorizontalAlignment="Left" Margin="20,3,0,2" VerticalAlignment="Center" Width="78" Content="Enter Name"/>
			<input:AutoCompleteBox x:Name="autoCompleteNameSearch" Height="22" Width="125" TextChanged="autoCompleteNameSearch_TextChanged" IsTextCompletionEnabled="True"/>
			<!--<HyperlinkButton x:Name="linkCandidateDetails" Margin="-28,10,0,12" Width="130" Foreground="#FF092084" Content="Add New Candidate" FontWeight="Bold" Click="Link_CandidateDetail_Click" VerticalAlignment="Center"/>
            <HyperlinkButton x:Name="linkQuestionBank" Margin="8,10,0,12" Width="130" Foreground="#FF092084" Content="Question Bank" FontWeight="Bold" Click="linkQuestionBank_Click" VerticalAlignment="Center"/>-->
		</StackPanel>
        <datagrid:DataGrid x:Name="dataGrid" ItemsSource="{Binding}" VerticalAlignment="Top" Height="487" 
                           Margin="20,4,0,0" MinColumnWidth="10" Grid.Row="1" 
                           ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                           ScrollViewer.VerticalScrollBarVisibility="Auto" AutoGenerateColumns="False">
            <datagrid:DataGrid.RowBackground>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#fcfcfd" Offset="0.015" />
                    <GradientStop Color="#f5f6f9" Offset="0.375" />
                    <GradientStop Color="#edf0f5" Offset="0.6" />
                    <GradientStop Color="#e3e6eb" Offset="1" />
                </LinearGradientBrush>
            </datagrid:DataGrid.RowBackground>
            <datagrid:DataGrid.Columns>
                <datagrid:DataGridTextColumn Header="QuestionSet" Binding="{Binding Question.Name}" >
                </datagrid:DataGridTextColumn>
                <datagrid:DataGridTextColumn Header="Candidate Name" Binding="{Binding Candidate.FirstName}" >
                </datagrid:DataGridTextColumn>
                <datagrid:DataGridTextColumn Header="Duration" Binding="{Binding Duration}"></datagrid:DataGridTextColumn>
                <datagrid:DataGridTemplateColumn Header="View Solution">
                    <datagrid:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Button Content="View Solution" Tag="{Binding Id}" Click="View_Solution">
                                <Button.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="DarkGray" Offset="0"/>
                                        <GradientStop Color="LightGray" Offset="1"/>
                                    </LinearGradientBrush>
                                </Button.Background>
                            </Button>
                        </DataTemplate>
                    </datagrid:DataGridTemplateColumn.CellTemplate>
                </datagrid:DataGridTemplateColumn>
            </datagrid:DataGrid.Columns>
            <datagrid:DataGrid.RowDetailsTemplate>
                <DataTemplate>
                    <StackPanel Background="LightBlue">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="This item has details." />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding FirstName}" />
                            <TextBlock Text=" " />
                            <TextBlock Text="{Binding LastName}" />
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </datagrid:DataGrid.RowDetailsTemplate>
        </datagrid:DataGrid>
        <ProgressBar x:Name="progressBar" Height="20" Margin="366,183,366,0" VerticalAlignment="Top" Grid.Row="1" IsIndeterminate="True"/>
		<dataInput:Label x:Name="lblWait" Height="36" Margin="366,135,366,0" VerticalAlignment="Top" Grid.Row="1" Content="Loading data..Please wait..." FontSize="13.333"/>
	</Grid>
</navigation:Page>
